import ManageAPI from "@/api/manage";
import { store } from "@/stores";
import { defineStore } from "pinia";
import { ref } from "vue";

export const useBigscreenStore = defineStore("bigscreen", () => {
  // 大屏时间筛选
  const activeTime = ref("");

  // 大屏时间筛选
  function setBigscreenTime(value) {
    activeTime.value = value;
  }

  return {
    activeTime,
    setBigscreenTime,
  };
});

/**
 * 用于在组件外部（如在Pinia Store 中）使用 Pinia 提供的 store 实例。
 * 官方文档解释了如何在组件外部使用 Pinia Store：
 * https://pinia.vuejs.org/core-concepts/outside-component-usage.html#using-a-store-outside-of-a-component
 */
export function useBigscreenStoreStoreHook() {
  return useBigscreenStore(store);
}
